
#pragma once

#include <WinDef.h>

#include "Core\Shader.h"
#include "Core\RenderTarget.h"

struct ID3D10Blob;
struct ID3D11InputLayout;
struct ID3D11PixelShader;
struct ID3D11VertexShader;

class HDRShader : public Shader
{
public:
	HDRShader();
	~HDRShader();

	// Management.
	//-----------------------------------------------
	// System memory.
	static BOOL IsLoaded();

	static BOOL Load();
	static VOID Unload();

	// Renderer.
	BOOL IsBinded() CONST;

	BOOL Bind();
	VOID Unbind();

	VOID Enable();

	// Parametrization.
	//-----------------------------------------------
	BOOL SetSource(CONST RenderTarget* source);

protected:
	HDRShader(CONST HDRShader&);
	HDRShader& operator = (CONST HDRShader&);

private:
	// Attributes.
	//-----------------------------------------------
	// Common data.
	static ID3D10Blob*		  s_vshader_buffer;
	static ID3D10Blob*		  s_pshader_buffer;

	static BOOL				  s_loaded;

	// Handler.
	ID3D11InputLayout*		  m_layout;
	ID3D11VertexShader*		  m_vshader;
	ID3D11PixelShader*		  m_pshader;

	BOOL					  m_binded;
	
	// Render targets.
	CONST RenderTarget*       m_source;
};

